package cn.yuanqiao.archive.bianyan.domain;

import cn.yuanqiao.common.annotation.Excel;
import cn.yuanqiao.common.annotation.IdAnnotation;
import cn.yuanqiao.common.exception.ServiceException;
import cn.yuanqiao.common.utils.StringUtils;
import cn.yuanqiao.common.core.domain.BaseEntity;
import cn.yuanqiao.common.utils.SecurityUtils;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 专题统稿内容对象 YQZHUANTICONTENT
 * 
 * @author xy
 * @date 2023-09-13
 */
public class SpecialSubjectContenr extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private final String BIGTABLENAME = "_YQZHUANTICONTENT";

    public SpecialSubjectContenr() {
        String tenantCode = SecurityUtils.getTenantCode();
        if(StringUtils.isEmpty(tenantCode)){
            throw new ServiceException("tenantCode is null");
        }else {
            this.tableName = tenantCode.toUpperCase()+BIGTABLENAME;
        }
    }




    /** id */
    @IdAnnotation
    @JsonFormat(shape = JsonFormat.Shape.STRING)//转化成string传到前端
    private Long id;

    /** 专题Id */
    @Excel(name = "专题Id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)//转化成string传到前端
    private Long typeId;

    /** 编辑内容 */
    @Excel(name = "编辑内容")
    private String content;

    /** 统稿内容 */
    @Excel(name = "统稿内容")
    private String manuscript;

    private String state;

    private String tableName;
    /*不保留：0 保留：1*/
    private String isKeep;
    /*资料Ids*/
    private String materialIds;
    /*档案Ids*/
    private String archiveIds;

    private String categoryIds;


    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setTypeId(Long typeId) 
    {
        this.typeId = typeId;
    }

    public Long getTypeId() 
    {
        return typeId;
    }
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    public void setManuscript(String manuscript) 
    {
        this.manuscript = manuscript;
    }

    public String getManuscript() 
    {
        return manuscript;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getIsKeep() {
        return isKeep;
    }

    public void setIsKeep(String isKeep) {
        this.isKeep = isKeep;
    }

    public String getMaterialIds() {
        return materialIds;
    }

    public void setMaterialIds(String materialIds) {
        this.materialIds = materialIds;
    }

    public String getArchiveIds() {
        return archiveIds;
    }

    public void setArchiveIds(String archiveIds) {
        this.archiveIds = archiveIds;
    }

    public String getCategoryIds() {
        return categoryIds;
    }

    public void setCategoryIds(String categoryIds) {
        this.categoryIds = categoryIds;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("typeId", getTypeId())
            .append("content", getContent())
            .append("manuscript", getManuscript())
            .toString();
    }
}
